//
//  Person.m
//  OCLearning
//
//  Created by Caldremch on 2018/5/25.
//  Copyright © 2018年 Caldremch. All rights reserved.
//

#import "Person.h"

@implementation Person



-(instancetype)init{
    if (self = [super init]) {
        //创建对象的car属性实际上就是Car类的那个唯一的实例。
        self.car = [Car car];//
        self.name = nil;
    }
    
    return self;
}


- (void)displayWithDriveHours:(int)hours{
    self.car.driveHours += hours;
}

@end
